package bishi.dada;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @author: 唐小尊
 * @email: 1171702529@qq.com
 * @cate: 2021/09/05 17:09
 */

/**
 * 22,3,450
 * 变成：543220，每个数字排序
 */
public class three {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        s = s.replace(" ", "");
        String[] split = s.split(",");
        List<Integer> list = new ArrayList<>();
        int[] nums = new int[10];
        for (String s1 : split) {
            int n = Integer.valueOf(s1);
            while (n!=0){
                nums[n%10]++;
                n/=10;
            }
        }
        StringBuilder sb = new StringBuilder();
        for (int i=9;i>=0;i--){
            for (int j=0;j<nums[i];j++){
                sb.append(i);
            }
        }
        System.out.println(sb.toString());
    }
}
